package com.tan00xu.controller;

import com.tan00xu.service.LoginService;
import com.tan00xu.utils.CmdOutputInformationUtils;
import com.tan00xu.vo.Result;
import com.tan00xu.vo.params.LoginParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class LoginController {

    @Autowired
    private LoginService loginService;

    /**
     * 登录
     * @return Result
     */
    @PostMapping("/login")
    public Result login(@RequestBody LoginParam loginParam){
        CmdOutputInformationUtils.info("LoginController下的login被请求了=>登录");
        return loginService.login(loginParam);
    }

}
